import React, { Component } from 'react'

import {
  Modal
} from 'antd'

import style from './index.less'

class App extends Component {
  render () {
    const {
      onCancel = f => f,

      ...rest
    } = this.props

    return (
      <Modal
        wrapClassName = { style['modal'] }
        closable = { false }
        maskClosable = { true }
        footer = { <div className = { style['close'] } onClick = { onCancel } /> }
        onCancel = { onCancel }
        centered

        { ...rest }
      />
    )
  }
}

Object.assign(App, Modal)

export default App
